package com.wondream.jenkins.service.impl;

import com.wondream.jenkins.service.JenkinsService;
import com.wondream.jenkins.utils.JenkinsUtils;
import com.wondream.jenkins.model.BuildResult;
import org.springframework.stereotype.Service;

/**
 * @author wangjun
 * @note JenkinsServiceImpl
 * @date 2025-01-02  9:27
 */
@Service
public class JenkinsServiceImpl implements JenkinsService {

    @Override
    public void buildJob(String jobName) {
//        jobName = "GZGA-BASE-STARTER-DEV";
        JenkinsUtils.buildJob(jobName);
    }

    @Override
    public BuildResult queryJobByQueueUrl(String jobName, String url) {
//        jobName = "GZGA-BASE-STARTER-DEV";
        return JenkinsUtils.queryJobByQueueUrl(jobName, url);
    }

    @Override
    public BuildResult queryJobByBuildUrl(String jobName, String url) {
//        jobName = "GZGA-BASE-STARTER-DEV";
        return JenkinsUtils.queryJobByBuildUrl(jobName, url);
    }

}
